# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=snapception
pkgver=8.c156f9e
pkgrel=13
groups=('blackarch' 'blackarch-sniffer' 'blackarch-crypto')
pkgdesc='Intercept and decrypt all snapchats received over your network.'
arch=('any')
url='https://github.com/thebradbain/snapception'
license=('MIT')
depends=('python2' 'ruby' 'python2-requests' 'python2-click'
         'python2-sortedcontainers'  'mitmproxy')
makedepends=('git' 'python2-setuptools')
source=("git+https://github.com/thebradbain/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python2 setup.py build
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  python2 setup.py install --root="$pkgdir" --skip-build
}

